﻿@{
    ViewBag.Title = "MapFilter";
    Layout = "~/Views/Shared/_Page.cshtml";
}

<h2>Map Filter</h2>

<table id="tblEmployee" class="normal_table">
	<tr>
		<td>Employee Name</td><td>Department Name</td><td>Salary</td>
	</tr>
	<tr>
		<td>Jane Smith</td><td>Marketing</td><td>$95,000</td>
	</tr>
	<tr>
		<td>John Smith</td><td>Technology</td><td>$90,000</td>
	</tr>
	<tr>
		<td>Brian Adam</td><td>Sales</td><td>$72,000</td>
	</tr>
	<tr>
		<td>Mary Jones</td><td>Support</td><td>$60,000</td>
	</tr>
	<tr>
		<td>Michael Jefferson</td><td>Technology</td><td>$85,000</td>
	</tr>
</table>
<br />
   
<input id="btnTestIt" type="button" value="Test It">

<script type="text/javascript">
    $(document).ready(function () {
        $("#btnTestIt").click(function () {
            var jqObj = $("#tblEmployee tr:gt(0)").map(function () {
                return $(this).children().first().text();
            })

            $(jqObj).each(function (index, elem) {
                ZEUS.DEBUG.log(elem);
            });

            ZEUS.DEBUG.log("---------------------------");
            var employees = jqObj.get().join(", ");
            ZEUS.DEBUG.log(employees);
            ZEUS.DEBUG.log("*****************************************");
        });
    });
</script>


